import { createRouter, createWebHistory } from "vue-router";
import Home from "@/views/Layout/index.vue";
import Login from "@/views/Login/index.vue";
const routes = [
  {
    path: "/",
    component: Home,
    children: [
      {
        path: "/",
        component: () => import("@/views/Layout/views/Home.vue"),
      },
    ],
  },
  { path: "/login", component: Login },
  { path: "/cart", component: () => import("@/views/ShoppingCart/index.vue") },
  {
    path: "/:pathMatch(.*)*",
    component: () => import("@/views/404/index.vue"),
  },
];
const router = createRouter({
  history: createWebHistory(),
  routes,
});
export default router;
